#define _GNU_SOURCE // 如是不声明gettid()不识别报错
#include "pthread.h"
#include "log/log.h"
#include "unistd.h"
#include "stdio.h"
void *first_thread_fun(void *arg)
{
    printf("first thread is running(%d)\n",gettid());
}

void *second_thread_fun(void *arg)
{
    printf("second thread is running(%d)\n",gettid());
}

int main(int argc, char *argv[])
{
    printf("main thread is running(%d)\n",gettid());
    pthread_t pt1, pt2;
    pthread_create(&pt1,NULL,first_thread_fun,NULL);
    pthread_create(&pt2,NULL,second_thread_fun,NULL);
    pthread_join(pt1,NULL);
    pthread_join(pt2,NULL);
    
    return 0;
}